import { http } from "@/utils/http";

export const GetCategories = (
	data: Eps.DocumentService.GetCategories_Params = {}
): Promise<Eps.DocumentService.GetCategories> => {
	return http.post(`/DocumentService/GetCategories`, Object.values(data));
};

export const GetDocumentById = (
	data: Eps.DocumentService.GetDocumentById_Params = {}
): Promise<Eps.DocumentService.GetDocumentById> => {
	return http.post(`/DocumentService/GetDocumentById`, Object.values(data));
};

export const GetDocumentByVid = (
	data: Eps.DocumentService.GetDocumentByVid_Params = {}
): Promise<Eps.DocumentService.GetDocumentByVid> => {
	return http.post(`/DocumentService/GetDocumentByVid`, Object.values(data));
};

export const GetDocuments = (
	data: Eps.DocumentService.GetDocuments_Params = {}
): Promise<Eps.DocumentService.GetDocuments> => {
	return http.post(`/DocumentService/GetDocuments`, Object.values(data));
};

export const GetDocumentsByTag = (
	data: Eps.DocumentService.GetDocumentsByTag_Params = {}
): Promise<Eps.DocumentService.GetDocumentsByTag> => {
	return http.post(`/DocumentService/GetDocumentsByTag`, Object.values(data));
};

export const GetHomeDocuments = (
	data: Eps.DocumentService.GetHomeDocuments_Params = {}
): Promise<Eps.DocumentService.GetHomeDocuments> => {
	return http.post(`/DocumentService/GetHomeDocuments`, Object.values(data));
};

export const GetHotDocuments = (
	data: Eps.DocumentService.GetHotDocuments_Params = {}
): Promise<Eps.DocumentService.GetHotDocuments> => {
	return http.post(`/DocumentService/GetHotDocuments`, Object.values(data));
};
